package com.example.base.security.domain.vo;

import com.example.base.validation.annation.IsMail;
import com.example.base.validation.annation.IsMobile;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

@Data
@ApiModel(description = "用户公共模块")
public class SysUserCommonVo implements Serializable {

    private Integer userId;

    @ApiModelProperty(value = "用户名",required = true)
    @NotBlank(message = "用户名不得为空")
    private String username;


    /**
     * 用户姓名
     */
    @ApiModelProperty(value = "用户姓名",required = true)
    @NotBlank(message = "用户姓名不得为空")
    private String realname;

    /**
     * 用户手机号
     */
    @IsMobile(message = "手机号格式错误")
    private String phone;

    /**
     * 用户邮箱
     */
    @IsMail(message = "邮箱格式错误",isRequiredNull = false)
    @ApiModelProperty(name = "用户邮箱")
    private String userMail;


}
